#include "iConfig.hpp"
#include <glf/task/taskThread.h>

namespace glf {

TaskThreadImpl::TaskThreadImpl()
	: Thread(THREAD_STACK_SIZE)
	, m_Active(true)
	, m_Tc(0)
{
}

TaskThreadImpl::~TaskThreadImpl()
{
}

bool TaskThreadImpl::IsActive()
{
	return m_Active;
}

void TaskThreadImpl::SetTaskCondition(TaskCondition& tc)
{
	m_Tc = &tc;
}

void TaskThreadImpl::Stop()
{
	m_Active = false;
	if(m_Tc)
	{
		m_Tc->Stop();
	}
}

} // end namespace glf
